package ocean.fauna;

import java.util.ArrayList;

import ocean.data.DataHolder;
import ocean.data.I.EntityBuilder;
import ocean.data.I.IdBuilder;
import ocean.fauna.I.Fish;


public class FaunaBuilder extends EntityBuilder
{
    public void generate() throws InstantiationException, IllegalAccessException
    {
	ArrayList res = new ArrayList();
	
	fill(res, DataHolder.getCarnivorousCount(), Carnivorous.class);
	
	setPositions((ArrayList<? extends IdBuilder>) res);
	fillIdObjMatrix((ArrayList<? extends IdBuilder>) res);

	fill(res, DataHolder.getHerbivorousCount(), Herbivorous.class);
	
	setPositions((ArrayList<? extends IdBuilder>) res);
	fillIdObjMatrix((ArrayList<? extends IdBuilder>) res);

	DataHolder.setOceanFauna((ArrayList<Fish>) res);
    }

}
